import axios from 'axios';
export const getApi = async function getApi(url) {
  try {
    const response = await axios.get(url);
    return response.data;
  } catch (error) {
    throw error;
  }
}

export const postApi = async function postApi(url,arg) {
  try {
    const response = await axios.post(url,arg);
    return response.data;
  } catch (error) {
    throw error;
  }
}

// 使用示例